﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using RichTextEditor;
using System.ServiceModel;
using System.Threading.Tasks;
using System.Threading;

namespace EditorLauncher
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            var host = new ServiceHost(typeof(Service));
            var closed = false;

            host.Opened += (sender, e) =>
            {

            };

            host.Faulted += (sender, e) =>
            {

            };

            host.Open();

            while (!closed)
            {
                closed = Service.IsShutdown;
                Thread.Sleep(100);
            }

            host.Close();
        }
    }
}
